package com.sjb.sixteen_journey_backend.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.time.LocalDateTime;
import java.io.Serializable;
import java.util.Date;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.sjb.sixteen_journey_backend.entity.vo.UserBaseMsgVo;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * <p>
 * 我的爆料表
 * </p>
 *
 * @author jcz
 * @since 2024-07-14
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("share_thing")
public class ShareThing implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 我的爆料表id
     */
    @TableId(value = "share_thing_id", type = IdType.AUTO)
    private Integer shareThingId;

    /**
     * 用户id
     */
    @TableField("user_id")
    @JsonIgnore
    private Integer userId;

    @TableField(exist = false)
    private UserBaseMsgVo user;

    @TableField(exist = false)
    private Boolean is_followedByUser;

    /**
     * 图片地址
     */
    @TableField("path")
    @JsonIgnore
    private String path;

    @TableField(exist = false)
    private List<String> images;

    /**
     * 类型0机票爆料;1酒店爆料；2其他爆料
     */
    @TableField("share_thing_status")
    private Integer shareThingStatus;

    /**
     * 购买渠道
     */
    @TableField("buy_way")
    private String buyWay;

    /**
     * 详情描述
     */
    @TableField("experience")
    private String experience;

    /**
     * 发布时间
     */
    @TableField(value = "postdate",fill = FieldFill.INSERT)
    private LocalDateTime postdate;

    /**
     * 被赞
     */
    @TableField("collected")
    private Integer collected;

    /**
     * 被喜欢
     */
    @TableField("be_liked")
    private Integer beLiked;

    @TableField(exist = false)
    private Long commentCount;

    /**
     * 浏览量
     */
    @TableField("pv")
    private Integer pv;

    /**
     * 性质：0需要抢;1不用抢，参与即得
     */
    @TableField("quality")
    private Boolean quality;

    /**
     * 有效期：0现在可上，速度！;1选择开始时间、结束时间；2现在可领，先到先得
     */
    @TableField("period_of_validity")
    private Integer periodOfValidity;

    /**
     * 有效期开始时间
     */
    @TableField("start_time")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date startTime;

    /**
     * 有效期结束时间
     */
    @TableField("end_time")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date endTime;

    /**
     * 航线：0单航线;1多航线；2领劵，3航司促销
     */
    @TableField("air_line")
    private Integer airLine;

    /**
     * 0单程；1往返
     */
    @TableField("air_way")
    private Boolean airWay;

    /**
     * 出发城市
     */
    @TableField("origin_city")
    private String originCity;

    /**
     * 到达城市
     */
    @TableField("arrive_city")
    private String arriveCity;

    /**
     * 含税价
     */
    @TableField("total_money")
    private Integer totalMoney;


    /**
     * 航空公司
     */
    @TableField("airline_company")
    private String airlineCompany;

    /**
     * 舱位（0经济舱/1头等商务舱）
     */
    @TableField("shipping_space")
    private Boolean shippingSpace;

    /**
     * 晒单表类型 5
     */
    @TableField("status")
    private Integer status;

    /**
     * 共性id
     */
    @TableField(exist = false)
    private Commonness commonness;

}
